home *** CD-ROM | disk | FTP | other *** search
- FPRINT Copyright 1985 by CCG., Inc.
-
-
- Please make a copy of this program & give it to your friends. If you find
- this program useful, a contribution would be greatly appreciated ($15.00
- suggested.) To obtain the latest version of FPRINT, and all of our other
- utilities, send a self-addressed, stamped disk mailer and a blank disk to:
-
- CCG, Inc.
- 9 Dudley Ct.
- Bethesda, MD 20814
- (301) 493-6725
-
-
- PURPOSE:
-
- FPRINT.COM is an enhanced print spooler for PC-DOS and MS-DOS. It will
- print a queue of files on your printer (parallel or serial) while you
- perform other tasks on the computer. FPRINT requires DOS 2.0 or above. The
- first time FPRINT is executed, it will increase the resident size of DOS by
- about 3800 bytes plus the specified print buffer size (1K - 48K).
-
- FPRINT offers many improvements over the standard PRINT.COM supplied
- with DOS, including:
-
- . Full DOS 2+ pathname support (including DOS 3.0)
- . Interrupt driven (supports PRN, LPT1, LPT2, LPT3, AUX, COM1, &
- COM2)
- . Supports both hardware handshaking (CTS) and XON/XOFF protocol
- on the serial ports
- . Variable RAM buffer size (1K - 48K bytes)
- . Compatible with the PC-DOS & MS-DOS print spoolers
- (except MUCH faster!)
- . Tab expansion option (/E)
- . Pagination (page numbering) with the /F: option
- . 1-255 copies per file using the /M: option
- . Suspend/restart printing with the /S option
- . Doesn't use up your file handles (PRINT.COM uses 1 file handle
- for each entry in the print queue.)
- . Up to 12 files in the queue at once
- . Full programming access via the 2F interrupt
-
-
- FORMAT:
-
- FPRINT [[d:][path][filename[.ext]][/C][/E][/F[:nn]][/M[:nn][/P][/S][/T]...]
-
- The following features are supported:
-
- . Multiple filenames can be entered on the command line, each with
- parameters.
- . The global characters ? and * are permitted in the filename
- and/or extension.
- . If no path is specified, the current default directory is assumed.
-
- If FPRINT is executed with no parameters, it will display the current
- status of the print queue.
-
- The first time FPRINT is executed, the following prompts will be
- displayed:
-
- Printer device [LPT1]:
- Print buffer size [1-48K]:
-
- The first prompt allows you to specify the printer port (PRN,LPT1,
- LPT2, LPT3, AUX, COM1, or COM1). The default is the first parallel
- port (LPT1), and it will be selected if you press RETURN.
-
- The second prompt allows you to select the amount of RAM that FPRINT
- will use to buffer the printing file. Using larger buffers will
- increase the speed of the spooler, and decrease the interference with
- your subsequent tasks. The default buffer size is 2K.
-
- It is possible to configure your system to automatically answer these
- questions so no user responses will be required. To do this, in your
- "autoexec.bat" file place a line:
-
- FPRINT < FPRINT.INP
-
- Next, create the file FPRINT.INP with one entry for the printer port
- and one entry for the RAM buffer. For example:
-
- LPT1
- 16
-
- This sets the printer port to the first parallel port and sets aside
- 16K bytes for the RAM buffer area.
-
-
- OPTIONS:
-
- /C sets the cancel mode. The file preceding the /C command as well as
- all subsequent files named on the command line will be removed from
- the queue, until the end of the command line is reached or a /P is
- found. If you cancel the currently printing file, the message: "File
- canceled by operator." will be printed, the printer bell will sound,
- and the paper will be advanced to the next page.
-
- Ex. #1 FPRINT test.doc/C
-
- Cancels the printing of the file "test.doc".
-
- Ex. #2 FPRINT test.doc/C test2.doc
-
- Cancels the printing of the files "test.doc" and
- "test2.doc".
-
-
- /E sets the tab expansion mode. If your printer can't handle tabs,
- this will expand tabs to spaces. Tab expansion will remain active
- until the computer is reset. (This option doesn't require a file
- name.)
-
- Ex. #1 FPRINT test.doc/E
-
- /F sets the format (pagination) mode. This will print a header on
- each page with the page number (for example, "Page 21").You can
- specify the page length by /F:nn, where nn is the page length in lines
- (e.g., /F:54). After printing the specified number of lines, FPRINT
- will print a form feed and start a new page. If no page length is
- specified, FPRINT assumes a default of 60 lines per page.
-
- Ex. #1 FPRINT test.doc/F
-
- The file "test.doc" will be printed with page number
- headers. Page length will be 60 lines per page.
-
- Ex. #2 FPRINT test.doc/F:48
-
- The file "test.doc" will be printed with page number
- headers. Page length will be 48 lines per page.
-
-
- /M allows you to print multiple copies of a file. The maximum number
- of copies allowed is 255.
-
- Ex. #1 FPRINT test.doc/M:4
-
- Four copies of the file "test.doc" will be printed,
- while only taking up 1 queue slot.
-
-
- /P sets the print mode. The file preceding the /P command as well as
- all subsequent files named on the command line will be printed from
- the queue until the end of the command line is reached or a /P is
- found. Note that this command is normally used in conjunction with the
- /C command and is otherwise unnecessary.
-
- Ex. #1 FPRINT test.doc/C test2.doc test3.doc/P
-
- Cancels the printing of the files "test.doc" and
- "test2.doc", and adds the file "test3.doc" to the
- queue.
-
-
- /S toggles the printing off and on, allowing you to pause the printer
- to take a telephone call, and then continue with no loss of characters.
-
-
- /T cancels all files in the print queue. If a file was printing, the
- message "All files canceled by operator." is printed, the printer
- bell will sound, and the paper will be advanced to the next page. Any
- commands following a /T on the command line will be ignored.
-
- Ex. #1 FPRINT /T
-
- Cancels the queue including any file currently printing.
-
-
-
- Note that the /E, /S, and /T commands do not require a filename.
-
- REMARKS:
-
- If FPRINT finds a disk or system error while printing, it will cancel
- the current file, print the error message, sound the printer bell, and
- advance the paper to the next page. Any remaining files in the queue
- will then be printed.
-
- Because FPRINT uses interrupts to control printing, it can come into
- conflict with some other programs. BASIC, for example, will reset the
- serial port interrupts and vectors on entry and again on exit. If the
- FPRINT queue is empty, nothing unusual will happen. If, on the other
- hand, FPRINT is printing a file, there will be a slight pause as
- FPRINT detects the change, and resets the interrupts and vectors.
-
-
- BENCHMARKS:
-
- The benchmarks were executed on an IBM PC-XT running DOS 2.1. The
- serial port (COM1) was connected to a terminal running at 4800 baud.
- The parallel port (LPT1) was connected to an Epson FX-80. PRINT.COM
- is the standard PC-DOS spooler provided with DOS 2.1. The text file
- was 26K in length. First, each spooler was tested with no other
- system activity. Then, each system loaded BASICA after starting the
- printing (but no program was run). Finally, each started a lengthy
- compile after starting printing. The compile time is also given to
- indicate the relative system throughput.
-
- PRINT.COM FPRINT.COM % Gain
-
- COM1: 1:04 :55 16%
- w/BASIC 5:31 :55 602%
- w/compile 5:41 :55 620%
-
-
- LPT1: 6:00 5:56 1%
- w/BASIC 9:09 6:26 42%
- w/compile 10:40 6:29 65%
-
- Compile time 11:45 10:56 7%
-
- Note there is only a marginal gain in printing speed when the
- system is devoted solely to printing; however, when performing
- other tasks, both the throughput and the print speed increase
- significantly. The faster your printer, the more dramatic the
- speed increase.
-
-
- PROGRAMMING:
-
- FPRINT can be called from your programs via interrupt 2F hex.
- (FPRINT must have been loaded prior to an INT 2F). On entry:
-
- AH = 0 to add a file to the queue
- 1 to delete a file from the queue
- FF hex to return # of files in the queue
-
- AL = number of copies to print
-
- DS:DX = pointer to filename (with optional disk & path)
- The filename can include wildcards (? and *).
-
- if DX = -1, delete all the files in the queue.
-
- On return:
-
- AH = number of files in the queue
-
- AL = 0 ok
- 1 queue full (if AH=0 on entry)
-
- ES:BX = pointer to base of print queue
-
- ES:DX = pointer to current file
-
- The print queue structure is:
-
- 2 byte ptr to next entry in queue
- 1 byte current block number
- 1 byte number of copies to print
- 78 bytes disk, path & filename
- (if first byte = -1, that entry is inactive)
-
- CX, DI, SI, and DS are preserved, all other registers are destroyed.
-
-